def send(sender,key,receiver,subject='subject',body='body',html=None,file=None,fileName='fileName',fileMainType='',fileSubType=''):
    import smtplib
    smtp=smtplib.SMTP('smtp.qq.com',25)
    import ssl
    context=ssl.create_default_context()
    from email.message import EmailMessage
    msg=EmailMessage()
    msg['subject']=subject
    msg['From']=sender
    msg['To']=receiver
    msg.set_content(body)
    if html is not None:
        msg.add_alternative(html,subtype='html')
    if file is not None and fileMainType is not None and fileSubType is not None:
        msg.add_attachment(file,maintype=fileMainType,subtype=fileSubType,filename=fileName)
    
    with smtplib.SMTP_SSL("smtp.qq.com",465,context=context) as smtp:
        smtp.login(sender,key)
        smtp.send_message(msg)
